
<html>
  <head>
    <script src="../dist/skulpt.js" type="text/javascript"></script>
    <script src="../dist/skulpt-stdlib.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"> </script>
  </head>

  <body>
    <div id="mycanvas"  height="500" width="800"
	style="border-style: solid;"></div>

<textarea id="code" rows="24" cols="80">

</textarea>
    <script>
        var prog = document.getElementById("code").value;
	function builtinRead(x) {
	    if (Sk.builtinFiles === undefined || Sk.builtinFiles["files"][x] === undefined)
		    throw "File not found: '" + x + "'";
	    return Sk.builtinFiles["files"][x];
	}
    (Sk.TurtleGraphics || (Sk.TurtleGraphics = {})).target = 'mycanvas';

    Sk.configure({ read: builtinRead, __future__: Sk.python3 });

    Sk.builtinFiles.files["src/lib/outer/__init__.py"] = "";
    Sk.builtinFiles.files["src/lib/outer/inner/__init__.py"] = "";
    Sk.builtinFiles.files["src/lib/outer/inner/box.py"] = `message = "Nope, I am still here!"`;
    console.log(Sk.importMainWithBody("main", false, `
from outer.inner import box
message = "I overrode the original module's value"
box.message = message
from outer.inner.box import message
print(message)
    `).$d.message.v);

    </script>
  </body>
</html>
